public class Test {
    public static void main(String[] args) {
        Date date = new Date();
        date.print();
    }

    public static void main3(String[] args) {
        Date date1 = new Date();
        //Date date2 = new Date(2024,10,19);
    }


    /*public static void main2(String[] args) {
        Date date1 = new Date();
        date1.setDate(2018,8,8);
        date1.print();

        Date date2 = new Date();
        date2.setDate(2024,10,17);
        date2.print();
    }*/



    /*public static void main(String[] args){
        String s;
        System.out.println("s="+s);
        //s没有初始化，编译错误
        //Java当中局部变量必须先初始化，后使用
    }*/

    public static void main1(String[] args) {
        Dog dog = new Dog();
        dog.name = "大黄";
        dog.color = "黄色";
        dog.age = 5;
        dog.bark();
        dog.eat();
    }
}
